#pragma once

#include "XDlg.h"

class CSpalshDlg : public XDlg {
  public:
    CSpalshDlg();
    virtual ~CSpalshDlg();
    
  public:
    BOOL OnInitDialog(HWND wndFocus, LPARAM lInitParam);
    
    void DoInit();
    
  protected:
    LRESULT OnReqCodes(UINT uMsg, WPARAM wParam, LPARAM lParam);
    void OnTimer(UINT_PTR idEvent);
    void loadData(int idx);
    
  public:
    // *INDENT-OFF*
    BEGIN_MSG_MAP_EX(CSpalshDlg)
        MSG_WM_INITDIALOG(OnInitDialog)
        MESSAGE_HANDLER_EX(WM_REQ_CODES, OnReqCodes)
        MSG_WM_TIMER(OnTimer)
        CHAIN_MSG_MAP(SHostWnd)
        REFLECT_NOTIFICATIONS_EX()
    END_MSG_MAP()
    // *INDENT-ON*
  private:
    req_flag_ptr m_flag;
    int32_t     m_remain_count = 0;
};
